package com.nip.irregularvebsdict.utilities.assets;

import java.io.IOException;
import java.io.InputStream;

import android.content.Context;
import android.util.Log;

public class AssetsUtilities {

	private static InputStream inputStream;

	public static InputStream getInputStream(Context context, String fileName) {
		try {
			inputStream = context.getAssets().open(fileName);
			return inputStream;
		} catch (IOException e) {
			e.printStackTrace();
			Log.e("Parser Xml", e.getMessage());
			return null;
		}
	}
	
	public static void close()
	{
		if(inputStream != null)
		{
			try {
				inputStream.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
}
